import { stringify } from 'qs';
import { request,  }  from '../utils/request';
import { getConfig } from '../../config';
const config = getConfig();


// 区域点位统计
export async function queryDistrictList(params) {
  return request('/statistics/point/pointCountByDistrict', {
    method: 'POST',
    body: params,
  });
}

// 故障类型统计
export async function queryFaultTypeList(params) {
  return request('/statistics/repair/repairTypeStatistics', {
    method: 'POST',
    body: params,
  });
}

// 故障修复统计
export async function queryFaultRepairList(params) {
  return request('/statistics/repair/repairDoneCount', {
    method: 'POST',
    body: params,
  });
}


// 超时修复统计
export async function queryOverTimeList(params) {
  return request('/statistics/repair/overTimeRepairInfo', {
    method: 'POST',
    body: params,
  });
}


// 点位养护统计
export async function queryMaintainList(params) {
  return request('/statistics/maintain', {
    method: 'POST',
    body: params,
  });
}


// 区域点位统计 导出
export async function actionDistrictExport(params) {
  return request(
    "/statistics/point/pointCountByDistrictExport",
    {
      method: "POST",
      body: params
    },
    null,
    null,
    "download"
  );
}

// 故障类型统计 导出
export async function actionFaultTypeExport(params) {
  return request(
    "/statistics/repair/repairTypeStatisticsExport",
    {
      method: "POST",
      body: params
    },
    null,
    null,
    "download"
  );
}


// 故障修复统计 导出
export async function actionFaultRepairExport(params) {
  return request(
    "/statistics/repair/repairDoneCountExport",
    {
      method: "POST",
      body: params
    },
    null,
    null,
    "download"
  );
}

// 超时修复统计 导出
export async function actionOverTimeExport(params) {
  return request(
    "/statistics/repair/overTimeRepairInfoExport",
    {
      method: "POST",
      body: params
    },
    null,
    null,
    "download"
  );
}

// 点位养护统计 导出
export async function actionMaintainExport(params) {
  return request(
    "/statistics/maintain/export",
    {
      method: "POST",
      body: params
    },
    null,
    null,
    "download"
  );
}
